{extend name="base" /}
{block name="body"}
<form action="{:request()->url()}" class="layui-form layui-form-pane" method="post" onsubmit="return false;">
    <div class="layui-form-item">
        <label class="layui-form-label">上级菜单</label>
        <div class="layui-input-block">
            <select name="pid" lay-search>
                <option value="0">主菜单</option>
                {foreach name="authRule" item="v" empty="$empty"}
                <option value="{$v.id}" {if isset($data) and $data.pid == $v.id}selected="selected"{/if}{if input('pid')==$v.id}selected="selected"{/if}>{neq name="v.level" value="1"}|{php}for($i=1;$i<$v['level'];$i++){echo ' ---';}{/php}{/neq} {$v.cat_name}</option>
                 {/foreach}
            </select>
        </div>
    </div>
    
    <div class="layui-form-item">
        <label class="layui-form-label">栏目名称</label>
        <div class="layui-input-block">
            <input type="text" name="cat_name" value="{$data.cat_name|default=''}" autocomplete="off" placeholder="请输入名称" class="layui-input">
        </div>
    </div>

    <div class="layui-form-item" pane>
        <label class="layui-form-label">选择模板</label>
        <div class="layui-input-block">
           
                <input type="radio" name="column" value="1" {if isset($data.column) and $data.column == '1'}checked="checked"{/if} title="{:__('waterfall')}"  />
                <input type="radio" name="column" value="2" {if isset($data.column) and $data.column == '2'}checked="checked"{/if} title="游戏模板" />
                <input type="radio" name="column" value="3" {if isset($data.column) and $data.column == '3'}checked="checked"{/if} title="宫格图片" />
                <input type="radio" name="column" value="4" {if isset($data.column) and $data.column == '4'}checked="checked"{/if} title="下载模板" />
        </div>
    </div>
    
    <div class="layui-form-item" pane>
        <label class="layui-form-label">是否正常</label>
        <div class="layui-input-block">
            <input type="radio" name="status" value="1" {if isset($data.status) and $data.status == '1'}checked{/if} title="{:__('open')}"  />
                <input type="radio" name="status" value="0" {if isset($data.status) and $data.status == '0'}checked{/if} title="{:__('close')}" />
        </div>
    </div>
    
    <div class="layui-form-item">
        <label class="layui-form-label">是否排序</label>
        <div class="layui-input-block">
            <input type="text" name="weigh" value="{$data.weigh|default='0'}" autocomplete="off" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <div class="layui-input-block">
            <input type="hidden" name="id" value="{$data.id|default=''}">
                    <button class="layui-btn layui-btn-sm" lay-filter="save" lay-submit="">保存</button>
                    <button class="layui-btn layui-btn-sm layui-btn-danger close">关闭</button>
        </div>
    </div>
</form>
{/block}
